home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
007
/
datescrn.arc
/
SET_TIME.C
< prev
next >
Wrap
Text File
|
1985-12-12
|
896b
|
37 lines
/* set_time() */
/* This function performs a system function call to set the system */
/* time with the hours & monutes passed. */
set_time(hours, minutes)
int hours, minutes;
#define SET_TIME 0x2D
#define byte char
#define ONE 1
#define TWO 2
#define THREE 3
#define FOUR 4
#define FIVE 5
#define SIX 6
#define SEVEN 7
{
int hold_yr;
struct XREG {short ax, bx, cx, dx, si, di;};
struct HREG {byte al, ah, bl, bh, cl, ch, dl, dh;};
union REGS {
struct XREG x;
struct HREG h;
} inregs, outregs;
inregs.h.ch = hours;
inregs.h.cl = minutes;
inregs.h.dh = 0;
inregs.h.dl = 0;
inregs.h.ah = SET_TIME;
inregs.h.al = 0;
intdos(&inregs, &outregs);
}